<template>
	<view class="mesInf">
		<view class="shList" v-for="item in listSh" :key="item.id">
			<view class="spCard">
				<img :src=item.imgSh alt="商品图片加载失败" class="spImg" />
				<view class="spInf">
					<view class="spName">{{item.nameSh}} </view>
					<view class="spMap">
						<u-icon name="map" color='grey' size='20'></u-icon>
						<span class="mapN">{{item.adressSh}}</span>
					</view>
					<view class="spPrice">
						<span>￥{{item.priceSh}}</span>
						<view class="spSvolume">
							<span>已售出{{item.Svolume}}</span>
						</view>
					</view>

				</view>

			</view>
		</view>

	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	const listSh = ref([{
			id: 1,
			nameSh: '宝宝辅食',
			imgSh: '../../../static/demo_img/caln/c2.png',
			priceSh: 111,
			adressSh: '叶记面馆',
			Svolume: 200
		},
		{
			id: 2,
			nameSh: 'sp2',
			imgSh: '../../../static/demo_img/caln/c2.png',
			priceSh: 121,
			adressSh: '叶记面馆',
			Svolume: 200
		},
		{
			id: 3,
			nameSh: 'sp3',
			imgSh: '../../../static/demo_img/caln/c2.png',
			priceSh: 5,
			adressSh: '叶记面馆',
			Svolume: 200
		},
		{
			id: 4,
			nameSh: 'sp4',
			imgSh: '../../../static/demo_img/caln/c2.png',
			priceSh: 11231,
			adressSh: '叶记面馆',
			Svolume: 200
		}
	]);
</script>

<style lang="scss" scoped>
	.mesInf {
		width: 100%;
		margin-top: 50rpx;
		display: flex;
		flex-direction: column;
		align-items: center;

		.spCard {
			// --
			border: 5px solid  #ffd29e;
			border-radius: 8px;
			box-shadow: rgba(0, 0, 0, 0.19) 2px 3px 4px,
				inset rgba(0, 0, 0, 0.19) 0px 10px 20px,
				inset rgba(0, 0, 0, 0.23) 0px 6px 6px;
			// --
			margin-top: 20rpx;
			height: 270rpx;
			width: 88vw;
			border-radius: 13px;
			margin-bottom: 16rpx;
			background-position: center;
			background-size: cover;
			background-color: white;
			display: flex;

			.spImg {
				margin-top: 15rpx;
				margin-left: 20rpx;
				height: 240rpx;
				width: 240rpx;
				border-radius: 14px;

			}

			.spInf {
				margin-top: 50rpx;
				margin-left: 20rpx;

				.spName {
					font-size: 32rpx;
					font-weight: 600;
				}

				.spMap {
					margin-top: 20rpx;
					display: flex;
					gap: 10rpx;

					.mapN {
						font-size: 28rpx;
						color: grey;

					}
				}

				.spPrice {
					margin-top: 12rpx;
					color: darkred;
					display: flex;
					font-size: 40rpx;
					font-weight: 700;

					.spSvolume {
						color: grey;
						font-size: 20rpx;
					}
				}
			}
		}
	}
</style>